﻿// <copyright file="ApplicationWindow.cs" company="City of Portland, BES-ASM">
// </copyright>
// <summary>ApplicationWindow class</summary>

namespace BESASM.EMGAATS.UI.ArcMap
{
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;

  /// <summary>
  /// A wrapper for the ArcMap window to be used as owner for Windows Forms dialogs shown in ArcMap
  /// </summary>
  public class ApplicationWindow : IWin32Window
  {
    private IntPtr windowHandle;

    /// <summary>
    /// Initializes a new instance of the <see cref="ApplicationWindow"/> class.
    /// </summary>
    /// <param name="handle">The window handle for ArcMap (get from <code>IApplication.hWnd</code>).</param>
    public ApplicationWindow(int handle)
    { 
      this.windowHandle = new IntPtr(handle);
    }

    /// <summary>
    /// Gets the window handle of the owner window.
    /// </summary>
    public IntPtr Handle
    {
      get { return this.windowHandle; }
    }
  }
}
